-- GENERATED SPELL FOR [Azure Spellbreaker] --


function spell0_31009(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(58462,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31009', 10500, 1)
end

function spell1_31009(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(59257,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31009', 10500, 1)
end

function spell2_31009(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(25603,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31009', 5000, 1)
end

function Sorts_31009(pUnit, Event)
local choix_sorts_31009 = math.random(0, 2)
if choix_sorts_31009 == 0 then
pUnit:RegisterEvent('spell0_31009', 1, 1)
end
if choix_sorts_31009 == 1 then
pUnit:RegisterEvent('spell1_31009', 1, 1)
end
if choix_sorts_31009 == 2 then
pUnit:RegisterEvent('spell2_31009', 1, 1)
end
end

function mob31009_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31009', math.random(1500, 3000), 1)
end

function mob31009_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31009_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31009_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31009, 1, 'mob31009_Action')
RegisterUnitEvent(31009, 2, 'mob31009_Leave')
RegisterUnitEvent(31009, 3, 'mob31009_Kill')
RegisterUnitEvent(31009, 4, 'mob31009_Die')
